package me.cat.learn1.stringbuilderdemo;

import java.util.Scanner;

public class StringBuilderDemo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = sc.next();
        //StringBuilder的应用场景：字符串的反转和拼接
        String result = new StringBuilder().append(str).reverse().toString();
        if(str.equals(result)){
            System.out.println("对称");
        }else{
            System.out.println("不对称");
        }
    }
}
